﻿<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Basic Form - jQuery EasyUI Demo</title>
	<link rel="stylesheet" type="text/css" href="~/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="~/themes/icon.css">
	<script type="text/javascript" src="~/Scripts/jquery.min.js"></script>
	<script type="text/javascript" src="~/Scripts/jquery.easyui.min.js"></script>
</head>
<body>
<center>
	<h2>用户注册</h2>
	<p>请在下方填写注册信息</p>
	<div style="margin:20px 0;"></div>
	<div class="easyui-panel" title="" style="width:100%;max-width:400px;padding:30px 60px;">
		<form id="ff"  action="/ZhuCe/Index" method="post">
			<div style="margin-bottom:20px">
				<input class="easyui-textbox" name="username" style="width:100%" data-options="label:'帐号:'">
			</div>
			<div style="margin-bottom:20px">
				<input class="easyui-textbox" name="password" style="width:100%" data-options="label:'密码:'">
			</div>
		</form>
		<div style="text-align:center;padding:5px 0">
			@* <a href="javascript:void(0)" class="easyui-linkbutton"  style="width:80px" id="chaxun">注册</a> *@
			<input type="submit" value="注册register"/>
			<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()" style="width:80px">清除</a>
		</div>
	</div>
	
	
	
	<div closed="true" id="dlg" class="easyui-dialog" title="提示"
	     style="text-align:center; width:300px;height:200px;padding:10px" data-options="
				iconCls: 'icon-save',
				buttons: [{
					text:'Ok',
					iconCls:'icon-ok',
					handler:function(){
						$('#dlg').dialog('close');
                        $('#ff').form('clear');
					}
				}]
			">
		<h2>@ViewBag.Message</h2>
	</div>

	<form action="/ZhuCe/Index" method="post">
		@Html.AntiForgeryToken()

		<div>
			<label for="username">Username:</label>
			<input type="text" id="username" name="username" />
		</div>

		<div>
			<label for="password">Password:</label>
			<input type="password" id="password" name="password" />
		</div>

		<div>
			<input type="submit" value="Login" />
		</div>
		<a hidden="true"></a>
	</form>
	<script type="text/javascript">
		$(document).ready(function () {
			console.log('这是ready方法')
			if ('@ViewBag.Message'!=null){
				$('#dlg').dialog('open');
			}
			
		})
	</script>
	<script>
		function submitForm() {
			$('#ff').form('submit');
		}

		function clearForm() {
			$('#ff').form('clear');
		}
	</script>
</center>
</body>
</html>
